package com.jinbiao.annotion;

@TestAnnotation()
//@TestAnnotation(id=2,msg="word")  添加实际值
public class Test_Annotation {
	public static void main(String[] args) {
		
		//判断是否 包含 注解
		boolean hasAnnotation = Test_Annotation.class.isAnnotationPresent(TestAnnotation.class);
		
		if(hasAnnotation) {
			TestAnnotation annotation = Test_Annotation.class.getAnnotation(TestAnnotation.class);
			System.out.println("id"+"[]"+annotation.id());
			System.out.println("msg"+"[]"+annotation.msg());
		}

	}
}
